package com.totoro.domain;

import java.util.Collection;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * 由教研室主任产生 组号模板：信管-1，信管-2，信管-3....... 人数：不对应一个字段，而是对应一个查询语句（得到本组人数） 年号：毕业年份
 * 
 * @generated
 */
// 答辩组实体类
@Entity
@Table(name = "public_reply_group")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class PublicReplyGroup extends BaseDomain {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;// 主键
	/**
	 * @generated
	 */
	@ManyToOne
	@JoinColumn(name = "department_id")
	private Department department;// 教研室单位
	/**
	 * @generated
	 */
	@OneToMany(mappedBy = "publicReplyGroup")
	private Collection<Tutor> tutor;// 员工
	/**
	 * @generated
	 */
	private String description;// 描述
	/**
	 * @generated
	 */
	private String year;// 年号
	/**
	 * @generated
	 */
	@OneToMany(mappedBy = "publicReplyGroup")
	private Collection<Project> project;// 毕业设计
	/**
	 * @generated
	 */
	// 组件映射
	@Embedded
	@AttributeOverrides({
			@AttributeOverride(name = "startDate", column = @Column(name = "startDate", length = 11)),
			@AttributeOverride(name = "endDate", column = @Column(name = "endDate")),
			@AttributeOverride(name = "room", column = @Column(name = "room")) })
	private DatePlace datePlace;// 答辩时间和地点

	// 空构造器
	public PublicReplyGroup() {
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Department getDepartment() {
		return department;
	}

	public void setDepartment(Department department) {
		this.department = department;
	}

	public Collection<Tutor> getTutor() {
		return tutor;
	}

	public void setTutor(Collection<Tutor> tutor) {
		this.tutor = tutor;
	}

	public Collection<Project> getProject() {
		return project;
	}

	public void setProject(Collection<Project> project) {
		this.project = project;
	}

	public DatePlace getDatePlace() {
		return datePlace;
	}

	public void setDatePlace(DatePlace datePlace) {
		this.datePlace = datePlace;
	}

	/**
	 * @generated
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description
	 * @generated
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @generated
	 */
	public String getYear() {
		return year;
	}

	/**
	 * @param year
	 * @generated
	 */
	public void setYear(String year) {
		this.year = year;
	}
}